﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>好友列表</title>
    <link href="/css/common.css" rel="stylesheet" type="text/css" />
    <link href="/css/account.css" rel="stylesheet" type="text/css" />
    <link href="/css/blog.css" rel="stylesheet" type="text/css" />

    <script src="/js/jquery.js" language="javascript" type="text/javascript"></script>

    <script src="/js/common.js" language="javascript" type="text/javascript"></script>

    <script src="/JS/jyAjax.js" type="text/javascript"></script>

    <link href="/JS/MsgBox/moonbox.css" rel="stylesheet" type="text/css" />

    <script src="/JS/MsgBox/moonbox.js" type="text/javascript"></script>

    <!--[if lt IE 7]> 
    <script src="/js/png.js" language="javascript" type="text/javascript"></script>
    <![endif]-->

    <script language="javascript" type="text/javascript">
        var oldobj;
        var oldhtml;
        $(function() {
            $(".fgroup a span").click(function() {
                bindClick(this);
            })
        })
        //绑定点击编辑触发按钮
        var bindClick = function(spanObj) {
            var html = "<input type=\"text\" class=\"text\" /><input type=\"button\" value=\"\" class=\"btnok\" />";
            $(spanObj).parent().parent().html(html)
				.find("input[type=text]").val($(spanObj).parent().attr("title"))
				.next("input[type=button]").click(function() {
				    var text = $(this).prev("input[type=text]").val();
				    $(this).parent().html("<a href=\"#\" title=\"" + text + "\" onclick='fillhtml(\"dpro\",\"/Friend/ListMain.ashx?classID=" 
				    + $(spanObj).attr("title") + "\")'><span title="
				    + $(spanObj).attr("title") + ">编辑</span>" + text + "</a>")
					.find("span").click(function() { bindClick(this) });
				    $.ajax({
				        url: "/Friend/UpdateFriendClass.ashx",
				        data: "CID=" + $(spanObj).attr("title") + "&CName=" + text,
				        type: "POST",
				        success: function(data) {
				            if (data == 'True') {
				                $.moonbox.ok('修改成功！')
				            }
				            else {
				                $.moonbox.error('修改失败！');
				            }
				        }
				    });				    
				});
        }
        function getFValue() {
            fillhtml("dpro", "/Friend/ListMain.ashx?classID=" + $("#fClass").val());
        }
        var myfill = function(){fillhtml('dpro','/Friend/ListMain.ashx');}
    </script>

</head>
<body>
    $Header$
    <div id="body">
        <div class="left">
            $LeftUserCmd$ $LeftUserFriendAdd$
        </div>
        <div class="right">
            <ul class="account">
                <h1 class="friend">
                    <a href="javascript:window.history.back();">返回上一页</a><p>
                        <b>我的好友列表</b></p>
                </h1>
                <li>
                    <div class="accdiv">
                        <h2>
                            <a href="/Friend/ListMain.aspx" $ClassFrdList$><span>好友列表</span></a>
                                <a href="/Friend/FriendClassManage.aspx" $ClassMng$><span>好友分组管理</span></a>
                                <a href="/Friend/FriendOnline.aspx" $ClassOnline$><span>在线好友</span></a>
                                <a href="/Friend/FriendCongnition.aspx" $ClassCongnition$><span>可能认识的人</span></a>
                                <a href="/Friend/VisitedIn.aspx"$ClassIn$><span>谁来看过我</span></a>
                                <a href="/Friend/VisitedOut.aspx" $ClassOut$><span>我去看过谁</span></a>
                            <a href="/Friend/Invite.aspx" class="last $ClassInvite$"><span>邀请好友</span></a>
                        </h2>
                        <ul>
                            <li class="blogli">
                                <div class="f_left">
                                    <h4>
                                        <span id="friendclass">
                                            <select id="fClass" onchange="getFValue();">                                                
                                                <option selected value=""><a href="javascript:;" onclick='fillhtml("dpro","/Friend/ListMain.ashx")'>
                                                    所有好友</a></option>
                                                    <option  value="0"><a href="javascript:;" onclick='fillhtml("dpro","/Friend/ListMain.ashx")'>
                                                    未分组</a></option>
                                                $FriendClassOption$
                                            </select></span> &nbsp; 共$FriendCount$个好友</h4>
                                    <div id="dpro">
                                        <!--<img src="/JS/MsgBox/preload.gif" />-->
                                        $user_friendlist_main_ul$
                                    </div>
                                </div>
                                <div id="divRight" class="f_right">
                                    <h3>
                                        快速查找朋友</h3>
                                    <ul>
                                        <li>
                                            <form action="javascript:fillhtml('dpro','/Friend/ListMain.ashx?txtFriendName='+escape($('#txtFriendName').val()))" method="post">
                                            <input id="txtFriendName" type="text" class="text" /><input type="submit" value="" class="btnseah" />
                                            </form>
                                        </li>
                                    </ul>
                                    <h3>
                                        我的好友分组</h3>
                                    <ul class="fgroup">
                                        <li><a href="javascript:;" onclick='fillNewHtml("dpro","/Friend/ListMain.ashx")'>所有好友</a></li>
                                        <li><a href="javascript:;" onclick='fillhtml("dpro","/Friend/ListMain.ashx?classID=0")'>未分组($ClassNull$)</a></li>
                                        $user_friendlist_fgroup_li$
                                    </ul>
                                    <h3>
                                        我的网络朋友</h3>
                                    <ul class="fgroup">
                                        <li><a href="javascript:;" onclick='fillNewHtml("dpro","/Friend/ListMain.ashx")'>所有好友</a></li>
                                        <li><a href="javascript:;" onclick='fillhtml("dpro","/Friend/FriendListByArea.ashx?areaID=0")'>未知地区($AreaNull$)</a></li>
                                        $FriendGroupByArea$                                        
                                    </ul>
                                </div>
                            </li>
                        </ul>
                    </div>
                </li>
                <h6>
                </h6>
            </ul>
        </div>
    </div>
    <div class="Clear">
    </div>
    $Footer$
</body>
</html>



